package com.weiz.sso.entity;

/**
 * 类功能简述：
 * 类功能详述：
 *
 * @author weiz
 *  2019/2/28 18:39
 */
public class ReturnResult {
    private int code;
    private String message;
    private Object data;

    public ReturnResult() {
    }

    public ReturnResult(int code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static ReturnResult successResult(Object data) {
        return new ReturnResult(1, "", data);
    }

    public static ReturnResult failedResult(String message) {
        return new ReturnResult(0, message, null);
    }
}
